package com.keeping.aiimagery.service.impl;

import com.keeping.aiimagery.entity.OrdersGoods;
import com.keeping.aiimagery.entity.QueryVo;
import com.keeping.aiimagery.mapper.OrdersGoodsMapper;
import com.keeping.aiimagery.service.OrdersGoodsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 充值记录 服务实现类
 * </p>
 *
 * @author keeping
 * @since 2023-04-05
 */
@Service
public class OrdersGoodsServiceImpl extends ServiceImpl<OrdersGoodsMapper, OrdersGoods> implements OrdersGoodsService {
    @Resource
    private OrdersGoodsMapper ordersGoodsMapper;
    public int insert(OrdersGoods ordersGoods){
        return ordersGoodsMapper.insert(ordersGoods);
    }
    public OrdersGoods findByTradeNo(String tradeNo){
        return ordersGoodsMapper.findByTradeNo(tradeNo);
    }
    public List<OrdersGoods> selectPageById(QueryVo queryVo){
        return ordersGoodsMapper.selectAllById(queryVo);
    }
    public int countById(Integer userId){
        return ordersGoodsMapper.countById(userId);
    }
}
